package dao;

import java.util.ArrayList;

import dto.LeaveDTO;
import dto.LeaveSearchDTO;

public interface LeaveDAO
{
	public LeaveDTO findLeave(int leaveID) throws DAOException;

	public ArrayList<LeaveDTO> getLeaveHistory(int userID) throws DAOException;
	
	//public ArrayList<LeaveDTO> findAllLeave() throws DAOException;

	public void applyLeave(LeaveDTO Leave) throws DAOException;

	public void updateLeave(LeaveDTO Leave) throws DAOException;

	public void setLeaveStatus(String LeaveStatus, String RejectionReason,int ApplicantID) throws DAOException;
	
	public void deleteLeave(LeaveDTO Leave) throws DAOException;
	
	public void removeFromDatabase(LeaveDTO leave) throws DAOException;

	public ArrayList<LeaveDTO> findLeaveByCriteria(LeaveSearchDTO criti)
			throws DAOException;

	public ArrayList<LeaveDTO> findSubordinatesOnLeave(LeaveSearchDTO criti)
			throws DAOException;
	
	public ArrayList<LeaveDTO> findLeaveByAllSubordinates(int userID) throws DAOException;
	
	public ArrayList<LeaveDTO> findSubordinatesOnLeave(LeaveSearchDTO criti,
			String leaveType) throws DAOException;
	
	public void updateLeaveSpent(int leaveSpent, int leaveID) throws DAOException;
	
	public long getLastestManipulateRecordID() throws DAOException;
}
